home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Libris Britannia 4
/
science library(b).zip
/
science library(b)
/
DJGPP
/
AECUR102.ZIP
/
contrib
/
curses
/
src
/
memsetw.c
< prev
next >
Wrap
Text File
|
1991-11-04
|
572b
|
29 lines
/**********************************************************************
*
* memsetw.c
*
* copyright (c) 1988,89,90 J. Alan Eldridge
*
* memsetw() in C
*
* fill an array with 2-byte values
*
*********************************************************************/
#if defined(__GNUC__)
#define far
#endif
void
memsetw(
void far *buf,
void *valp,
int wcnt)
{
short far *wordptr = buf;
short wordval = *(short *)valp;
while (wcnt-- > 0)
*wordptr++ = wordval;
}